﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserInsert.aspx.cs" Inherits="Pages_PersonInsert" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:Label ID="Label1" runat="server" Text="Nome:"></asp:Label>
        <asp:TextBox ID="txbName" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="txbName" ErrorMessage="O nome não pode ser nulo">*</asp:RequiredFieldValidator>
        <br />
        <br />
        <asp:Label ID="Label2" runat="server" Text="E-Mail:"></asp:Label>
        <asp:TextBox ID="txbEMail" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
            ControlToValidate="txbEMail" ErrorMessage="E-Mail inválido" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
            ControlToValidate="txbEMail" ErrorMessage="Digite um E-Mail">*</asp:RequiredFieldValidator>
&nbsp;
        &nbsp;
        <br />
        <br />
        <asp:Label ID="Label6" runat="server" Text="Unidade : "></asp:Label>
        <asp:DropDownList ID="ddlUnit" runat="server" 
            onselectedindexchanged="ddlUnit_SelectedIndexChanged" AutoPostBack="True">
        </asp:DropDownList>
        <br />
        <br />
        <asp:Label ID="Label5" runat="server" Text="Setor : "></asp:Label>
        <asp:DropDownList ID="ddlSector" runat="server">
        </asp:DropDownList>
        <br />
        <br />
        <asp:Label ID="Label3" runat="server" Text="Senha:"></asp:Label>
        <asp:TextBox ID="txbPassword" runat="server" TextMode="Password"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
            ControlToValidate="txbPassword" ErrorMessage="Digite sua senha de acesso">*</asp:RequiredFieldValidator>
        <asp:Label ID="Label4" runat="server" Text="Confirme a senha"></asp:Label>
        <asp:TextBox ID="txbPasswordValidate" runat="server" TextMode="Password"></asp:TextBox>
        <asp:CompareValidator ID="CompareValidator1" runat="server" 
            ControlToCompare="txbPasswordValidate" ControlToValidate="txbPassword" 
            ErrorMessage="as senhas são diferentes">*</asp:CompareValidator>
        <br />
        <br />
        <asp:Button ID="btnInsert" runat="server" Text="Cadastrar" 
            onclick="btnInsert_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="hlPersonMain" runat="server" NavigateUrl="UserMain.aspx">Lista de Pessoas</asp:HyperLink>
    
        <br />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
    
    </div>
    </form>
</body>
</html>
